<?php
/**
 * Created by PhpStorm.
 * User: apple
 * Date: 2018/11/26
 * Time: 9:46 AM
 */

require('../vendor/autoload.php');

$openapi = \OpenApi\scan('../application/shop/');
//header('Content-Type: application/x-yaml');

$filename = __DIR__ . '/swagger/openapi.yaml';
//echo $filename;

file_put_contents($filename, $openapi->toYaml());

header('location: /swagger/index.html');